package com.xjtu.se.homework.client.faq.controller;

import com.xjtu.se.homework.client.faq.dto.ClientFaqDto;
import com.xjtu.se.homework.client.faq.dto.ClientSearchDto;
import com.xjtu.se.homework.client.faq.service.ClientFaqService;
import com.xjtu.se.homework.common.Result;
import com.xjtu.se.homework.ops.faq.dao.FaqDao;
import com.xjtu.se.homework.ops.faq.dto.FaqDto;
import com.xjtu.se.homework.ops.faq.service.FaqService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/helper/faq")
public class ClientFaqAPI {
    @Resource
    private ClientFaqService clientFaqService;
    @GetMapping("/showAll")
    public Result queryFAQs(ClientSearchDto dto){
        List<ClientFaqDto> result =  clientFaqService.showAll(dto);
        for(ClientFaqDto clientFaqDto :result){
            System.out.println(clientFaqDto.toString());
        }
        return Result.success("",result);
    }
}
